<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:getAsString name="xxx" ignore="true"/>
<c:set var="pageType"><tiles:getAsString name="pageType"/></c:set>
<c:choose>
	<c:when test="${pageType eq 'customer'}">
		<c:if test="${not empty customer}">
			<c:set var="userName" value="${customer.firstName} ${customer.lastName}"/>
		</c:if>
	</c:when>
	<c:otherwise>
		<c:if test="${not empty business}">
			<c:set var="userName" value="${business.businessName}"/>
		</c:if>
	</c:otherwise>
</c:choose>
		<div class="full-width pull-left">
			<div class="user-login-status">
				<div class="text-right padding-vertical-half padding-horizontal">
				<c:choose>
					<c:when test="${empty userName}">
						<c:set var="signupUrl"><tiles:getAsString name="signup-url"/></c:set>
						<div class="margin-bottom-half"><a class="btn <tiles:getAsString name="signupButtonCss"/>" href="<c:url value="${signupUrl}"/>">Sign up</a></div>
						<c:set var="loginUrl"><tiles:getAsString name="login-url"/></c:set>
						<div><a class="btn <tiles:getAsString name="loginButtonCss"/>" href="<c:url value="${loginUrl}"/>">Log in</a></div>
					</c:when>
					<c:otherwise>
						<div class="text-right">
						<%--
						<div class="margin-bottom-half font-16 greeting" >
							<span class="capitalize"><fmt:message key="msg.welcome"/></span> 
							<c:set var="profileUrl"><tiles:getAsString name="profile-url"/></c:set>
							<a href="<c:url value="${profileUrl}"/>">
								<span title='<c:out value="${userName}"/>' class="capitalize">
									<c:out value="${userName}"/>
								</span>
							</a>
						</div>
						--%>
						<div class="font-15 capitalize margin-bottom">
						<c:set var="profileUrl"><tiles:getAsString name="profile-url"/></c:set>
							<a href="<c:url value="${profileUrl}"/>">Your Account</a>
						</div>
						<div class="font-15 capitalize">
							<c:set var="logoutUrl"><tiles:getAsString name="logout-url"/></c:set>
							<a href="<c:url value="${logoutUrl}"/>"><fmt:message key="msg.logout"/></a>
						</div>
						</div>
					</c:otherwise>
				</c:choose>
				</div>
			</div>
		</div>
      <c:set var="navBrand"><tiles:getAsString name="navbar-brand"/></c:set>
      <a href="<c:url value="${fn:substringAfter(navBrand,'|')}"/>">
	<div class="logo">
	 	<div class="font-40 margin-bottom float-left">
			<div class="rotate k">K</div>
			<div class="rotate s">S</div>
			<div class="rotate r">R</div>
		</div>
		<div class="font-20 float-left text-logo">
			<div class="text-logo kids">Kids</div>
			<div class="text-logo service">Service</div>
			<div class="text-logo resource">Resource</div>
		</div>
	</div>	
	</a>
<div class="clearfix"></div>
